using UnityEngine;

public class FeedbackButton : MonoBehaviour
{
	private ButtonViewUpdate _buttonUpdater;

	private ButtonViewUpdate buttonUpdater
	{
		get
		{
			if (_buttonUpdater == null)
			{
				_buttonUpdater = GetComponent<ButtonViewUpdate>();
			}
			return _buttonUpdater;
		}
	}

	public void OnSubmitFeedback()
	{
		if (!GGSupportMenu.instance.isNetworkConnected())
		{
			TableTennisDialog.instance.ShowOk("Connect to internet", "You need to be connected to the internet to send feedback. Please check your internet connection and try again!", "Ok", null);
		}
		else
		{
			GGSupportMenu.instance.SubmitFeedback(GGPlayerSettings.instance.Model.name, ConfigBase.instance.appName, BehaviourSingletonInit<GGServerRequestsBackend>.instance.cachedPlayerId);
		}
	}
}
